package com.msmall.community.vote.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.msmall.base.model.BaseObject;

@Entity
@Table(name="base_vote")
public class Vote extends BaseObject{

	private static final long serialVersionUID = -3769926528334049064L;

	@Id
	@Column(name="voteid",insertable=false,updatable=false)
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long voteid;
	
	/**
	 * 投票人
	 */
	@Column(name="voter")
	private Long voter;
	/**
	 * 被投票人
	 */
	@Column(name="voted")
	private Long voted;
/**
 * 所属模块；1旅游达人 ConstantDB.VOTE_MODULE_
 */
	@Column(name="module")
	private Integer module;
	/**
	 * 类型：2赞成 1反对 ConstantDB.VOTE_TYPES_
	 */
	@Column(name="types")
	private Integer types;
	/**
	 * 投票时间
	 */
	@Column(name="create_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	
	public Long getVoteid() {
		return voteid;
	}

	public void setVoteid(Long voteid) {
		this.voteid = voteid;
	}

	public Long getVoter() {
		return voter;
	}

	public void setVoter(Long voter) {
		this.voter = voter;
	}

	public Long getVoted() {
		return voted;
	}

	public void setVoted(Long voted) {
		this.voted = voted;
	}

	public Integer getModule() {
		return module;
	}

	public void setModule(Integer module) {
		this.module = module;
	}

	public Integer getTypes() {
		return types;
	}

	public void setTypes(Integer types) {
		this.types = types;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

}
